package com.example.mybatisplus.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.example.mybatisplus.model.Grade;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface GradeMapper extends BaseMapper<Grade> {
    @Update("update grade set math = #{score} ${ew.customSqlSegment}")
    void updateMathById(@Param(Constants.WRAPPER) QueryWrapper<Grade> wrapper, @Param("score") int score);
}
